home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / syssgi.h.z / syssgi.h
C/C++ Source or Header  |  1992-04-03  |  6KB  |  189 lines

  1. /**************************************************************************
  2.  *                                      *
  3.  *          Copyright (C) 1986, Silicon Graphics, Inc.          *
  4.  *                                      *
  5.  *  These coded instructions, statements, and computer programs  contain  *
  6.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  7.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  8.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  9.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  10.  *                                      *
  11.  **************************************************************************/
  12.  
  13. #ifndef __SYSSGI_H__
  14. #define __SYSSGI_H__
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. #ident "$Revision: 3.44 $"
  21.  
  22. /*
  23. ** syssgi() system call commands.
  24. */
  25.  
  26. #define SGI_SYSID        1    /* get the system ID */
  27. #define    SGI_RDUBLK        2    /* read user area */
  28. #define    SGI_TUNE        3    /* change tune values --
  29.                         see sys/tuneable.h */
  30. #define    SGI_IDBG        4    /* access to internal debugger */
  31. #define SGI_INVENT        5    /* hardware inventory */
  32. #define SGI_RDNAME        6    /* get name of process given pid */
  33. #define SGI_SETLED        7    /* set cpu board led state(s) */
  34. #define SGI_SETNVRAM        8    /* set nvram */
  35. #define SGI_GETNVRAM        9    /* get nvram */
  36. #define SGI_ENABLE_FTIMER    10    /* turn fastimer on/off */
  37. #define SGI_DISABLE_FTIMER    11
  38. #define SGI_QUERY_FTIMER    12
  39. #define SGI_QUERY_CYCLECNTR    13
  40. #define SGI_PROCSZ        14    /* recalc p_size, p_rsssize */
  41.  
  42. /* POSIX signal system calls */
  43. #define SGI_SIGACTION    15
  44. #define SGI_SIGPENDING    16
  45. #define SGI_SIGPROCMASK    17
  46. #define SGI_SIGSUSPEND    18
  47. /* Other POSIX system calls */
  48. #define SGI_SETSID    20
  49. #define SGI_SETPGID    21
  50. #define SGI_SYSCONF    22
  51. #define SGI_WAIT4    23
  52. #define SGI_PATHCONF    24
  53.  
  54.  
  55. /* Block read & Block write system calls: to allow access to > 2 gig
  56.  * of space on a disk or logical volume for large filesystems.
  57.  */
  58. #define SGI_READB    30
  59. #define SGI_WRITEB    31
  60.  
  61. /* BSD-style setgroups() and getgroups() system calls */
  62. #define SGI_SETGROUPS    40
  63. #define SGI_GETGROUPS    41
  64.  
  65. #define SGI_ENABLE_FASTCLOCK    50    /* turn fast clock on/off */
  66. #define SGI_DISABLE_FASTCLOCK    51
  67. #define SGI_SETTIMEOFDAY    52    /* set time including microseconds */
  68. #define SGI_SETTIMETRIM        53    /* change crystal trimmer */
  69. #define SGI_GETTIMETRIM        54
  70. #define SGI_SPROFIL        55    /* sprofil(2) entry point */
  71. #define SGI_RUSAGE        56    /* Berkeley's getrusage(2) */
  72. #define SGI_SIGSTACK        57    /* Berkeley's sigstack(2) */
  73. #define SGI_SIGSTATUS        58    /* sgi call to support BSD longjmp */
  74. #define SGI_NETPROC        59    /* start network process */
  75. #define SGI_SIGALTSTACK        60    /* SVR4 sigaltstack(2) */
  76. #define SGI_BDFLUSHCNT        61    /* change bdflushcnt */
  77. #define SGI_SSYNC        62    /* synchronous sync */
  78. #define SGI_NFSCNVT        63    /* convert file handle to descriptor */
  79. /*
  80.  * Trusted IRIX reserves 70-89. Give them 10 to spare
  81.  */
  82. #define SGI_RMI_FIXECC        100    /* RMI read ECC-correct on/off (1/0) */
  83. #define SGI_R4K_CERRS        101    /* return set of ECC cache-err cnts */
  84.  
  85.  
  86. /* the syssgi() SGI_RMI_FIXECC entrypoint toggles the RMI ecc
  87.  * read-correction. */
  88. #define RMI_ECC_OFF        0
  89. #define RMI_ECC_ON        1
  90.  
  91. #if (defined(R4000) && defined(_FORCE_ECC))
  92.  
  93. /* Debug stuff uses numbers up around 1000 */
  94. #define SGI_FORCE_ECC        1010    /* debug - force ecc errors */
  95.  
  96. enum force_ecc_where { IN_PD, IN_PI, IN_SD, IN_SI, IN_MEM, IN_MEM_IO3 };
  97.  
  98. /* each double-word in memory has an 8-bit ECC checkbit value that
  99.  * is computed and stored with it. */
  100. typedef struct ecc_data_word {
  101.     uint hi_word;
  102.     uint lo_word;
  103.     u_char ecc_val;
  104. } ecc_data_word_t;
  105. #endif /* R4K and _FORCE_ECC */
  106.  
  107. #ifdef    TRUSTEDIRIX
  108. /*
  109.  * System calls for mandatory access control.
  110.  */
  111. #define SGI_GETPLABEL        70    /* Get process label */
  112. #define SGI_SETPLABEL        71    /* Set process label */
  113. #define SGI_GETLABEL        72    /* Get file label */
  114. #define SGI_SETLABEL        73    /* Set file label */
  115. /*
  116.  * System calls for auditing (SAT).
  117.  */
  118. #define SGI_SATREAD        74    /* Read audit rec from the kernel */
  119. #define SGI_SATWRITE        75    /* Write audit rec to the kernel */
  120. #define SGI_SATCTL        76    /* Control/query the audit stream */
  121.  
  122. #define SGI_LOADATTR        77    /* Load attributes database */
  123. #define SGI_UNLOADATTR        78    /* Unload attributes database */
  124. /*
  125.  * System calls for trusted sockets.
  126.  */
  127. #define SGI_RECVLMSG        79    /* recvmsg() with label */
  128. /*
  129.  * System calls for Plan G data bases.
  130.  * See also SGI_LOADATTR and SGI_UNLOADATTR.
  131.  */
  132. #define SGI_PLANGMOUNT        80    /* mount() with PlanG info */
  133. #endif    /* TRUSTEDIRIX */
  134.  
  135. /* The internal values for the POSIX sysconf() are defined below; the libc
  136.  * sysconf() wrapper will include this file, and unistd.h #defines the 
  137.  * official names to these internal names.
  138.  */
  139. #define _INT_ARG_MAX        1
  140. #define _INT_CHILD_MAX        2
  141. #define _INT_CLK_TCK        3
  142. #define _INT_NGROUPS_MAX    4
  143. #define _INT_OPEN_MAX        5
  144. #define _INT_JOB_CONTROL    6
  145. #define _INT_SAVED_IDS        7
  146. #define _INT_VERSION        8
  147.  
  148. /* and the internal values for pathconf() */
  149. #define _INT_LINK_MAX        1
  150. #define _INT_MAX_CANON        2
  151. #define _INT_MAX_INPUT        3
  152. #define _INT_NAME_MAX        4
  153. #define _INT_PATH_MAX        5
  154. #define _INT_PIPE_BUF        6
  155. #define _INT_CHOWN_RESTRICTED    7
  156. #define _INT_NO_TRUNC        8
  157. #define _INT_VDISABLE        9
  158. /*
  159.  * kernel pathconf() must know whether called by fpathconf or 
  160.  * pathconf--i.e how to interpret the 1st parameter.  (It is not
  161.  * currently used at all, but may be in the future.)
  162.  */
  163. #define PATHCONF    1
  164. #define FPATHCONF    2
  165.  
  166.  
  167. #define    GET_SYSID    SGI_SYSID    /* compatability */
  168. #define    MAXSYSIDSIZE    64    /* maximum size in bytes of the system id   */
  169.  
  170. /* hardware inventory options */
  171. #define SGI_INV_SIZEOF    1    /* get sizeof inventory struct */
  172. #define SGI_INV_READ    2    /* read inventory table */
  173.  
  174.  
  175. /* nvram options */
  176. #define SGI_NVSTRSIZE    128    /* Not perfect, but reasonable size. */
  177.  
  178. #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
  179. #ifndef _KERNEL
  180. extern int syssgi(int, ...);
  181. #endif /* !_KERNEL */
  182. #endif
  183.  
  184. #ifdef __cplusplus
  185. }
  186. #endif
  187.  
  188. #endif /* __SYSSGI_H__ */
  189.